package com.markus.code.测试;

import java.util.concurrent.Executors;

/**
 * Author:markusZhang
 * Date:Create in 2020/8/10 17:23
 * todo:
 */
public class TestDemo {
    public static void main(String[] args) {
        System.out.println((int)'1');
        String str = "123";
        String str1 = String.valueOf("123");
        System.out.println(str == str1);
        System.out.println((char)('2'-'1'+'0'));
        Integer i1 = 100;
        Integer i2 = 100;
//        System.out.println(i1==i2);
        System.out.println(i1.equals(i2));
        System.out.println(Integer.MAX_VALUE);
        char begin = 0;
        System.out.println(begin+48);
        int i = (1 << 32-1)-1;
        int j = (int) (Math.pow(2,31)-1);
        System.out.println(i==j);
        System.out.println(Math.ceil(1.0*3/2));

//        ThreadLocal<A> threadLocal = new ThreadLocal<>();
//
//
//
//        A a = new A();
//        a.setAge(10);
//        a.setName("markus");
//        threadLocal.set(a);
//        threadLocal.get();
//        TestDemo demo = new TestDemo();
//        demo.updateObject(a);
//        System.out.println(a);
    }
    private void updateObject(A a){

        a.setAge(20);
        a.setName("silvia");
    }
}
class A{
    private String name;
    private Integer age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "A{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
